<?php

class DataController extends AppController {
  public $helpers = array('Html', 'TWSForm', 'Paginator');
  public $components = array('Session', 'Util', 'Upload');
  public $name = 'Data';
  public $paginate;


  function __construct($request=null, $response=null) {
    parent::__construct($request, $response);
    /*$this->paginate = array(
        'limit' => Configure::read('App.pageResultLimit'),
        'order' => array(
            'Ad.name' => 'asc'
            )); */
  }

  function quotes() {
    $this->loadModel('Quote');    
    $quotes = $this->Session->read('Quotes');
    if (empty($quotes)) {
      $quotes = $this->Quote->find("all", array("order" => array("Quote.created" => 'desc')));
      $this->Session->write('Quotes', $quotes);
    }
    return $quotes;
  }

  
}

?>
